package net.homelinux.chaoswg.io.renga.core.gui.operations.reader;

import net.homelinux.chaoswg.io.higherorderfunctions.AbstractUnaryFunction;
import net.homelinux.chaoswg.io.renga.core.gui.operations.visualisations.ImageVisualisation;
import net.homelinux.chaoswg.io.renga.core.gui.operations.visualisations.Visualisation;

import org.jdom.Element;

public class ImageVisualisationReader extends AbstractUnaryFunction<Visualisation, Element> implements VisualisationReader {

    public Visualisation apply(final Element arg0) throws IllegalArgumentException {
        final String imageName = arg0.getChildText("image");
        
        return new ImageVisualisation (imageName);
    }

}
